home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK2.toast / Development Kits (Disc 2) / ScriptX / Code Samples / autofind / source / interfac.sx < prev    next >
Encoding:
Text File  |  1996-05-21  |  1.4 KB  |  52 lines  |  [TEXT/ttxt]

  1. --<<<-
  2.  
  3. --*=============================================================================*
  4. --* File: interfac.sx
  5. --*
  6. --* Purpose: Create a module which defines some basic interfaces which can be
  7. --*          used by Titles and Accessories to allow a certain amount of
  8. --*          communication between Titles and Accessories which may not
  9. --*          otherwise know about each other.
  10. --*
  11. --*          This particular interface module was designed to be used by
  12. --*          AutoFinder and any accessories which might want to be used by
  13. --*          the AutoFinder title, e.g. the Tape Measure.  However, this
  14. --*          same interface could be used by other titles.  Or you can
  15. --*          certainly create your own interface however you think is best.
  16. --*
  17. --* Author: Robert Lockstone : 12-15-95
  18. --*
  19. --*=============================================================================*
  20.  
  21. module AccessoryInterface
  22.     exports accessoryAnswersGetter, currentSceneGetter, getScale, updateScale,
  23.             addToTitle
  24. end
  25.  
  26. in module Scratch
  27.  
  28. (
  29. local lc := new LibraryContainer dir:(parentDir theScriptDir) \
  30.                                  path:"interfac.sxl"
  31.    
  32. lc.startUpAction := 
  33.    (
  34.    lc ->
  35.       (
  36.       forEach lc \
  37.          (
  38.          aModule xx ->
  39.             (
  40.             load aModule  --There's just one in this particular case.
  41.             )
  42.          ) undefined
  43.       )
  44.    )
  45.    
  46. append lc (getModule @AccessoryInterface)
  47.    
  48. close lc
  49. )
  50.  
  51. "Compiled interfac.sx"
  52.